#include<stdio.h>

int n;
int a[25];

int main()
{
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
        scanf("%d", &a[i]);
    int num = 0;
    for (int i = 2; i <= n; i++)
    {
        num++;
        int tmp = a[i] - a[i - 1];
        printf("%6d", tmp);
        if (num % 3 == 0)
            printf("\n");
    }
    return 0;
}